﻿using System;
using System.Data;

namespace gms.data {
	public class Game_System {
#region Properties
		public int system_id { get; set; }
		public string name { get; set; }
		public string plugin_ns { get; set; }
		public float version { get; set; }
#endregion
#region Constructors

#endregion
#region Additional Loads

#endregion
#region CRUD

#endregion
#region Utilities
		private void fill(DataSet values) {
			if (!Database.dataset_is_empty(values)) {
				for (int i = 0; i < values.Tables[0].Columns.Count; i++) {
					switch (values.Tables[0].Columns[i].ColumnName) {
						case "system_id": system_id = (int)values.Tables[0].Rows[0]["system_id"]; break;
						case "name": name = (string)values.Tables[0].Rows[0]["name"]; break;
						case "plugin_ns": plugin_ns = (string)values.Tables[0].Rows[0]["plugin_ns"]; break;
						case "version": version = (float)values.Tables[0].Rows[0]["version"]; break;
					}
				}
			}
		}
#endregion
	}
}